package com.question.business.runner;

import com.question.business.dict.repository.IDictCacheRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 字典缓存初始化
 *
 * @author star
 * @since 2023/9/7
 */
@Slf4j
@Component
public class DictCacheRunner implements ApplicationRunner {

    @Resource
    private IDictCacheRepository dictCacheRepository;

    @Override
    public void run(ApplicationArguments args) {
        dictCacheRepository.initCache();
    }

}
